package org.ly.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.sql.Timestamp;
import java.util.List;

public interface TempMessageRepository extends JpaRepository<TempMessage, Long> {

//    @Query("SELECT m FROM TempMessage m WHERE m.COLLECTTIME >= :fiveMinutesAgo")
//    List<TempMessage> findTempMessagesWithLast5Minutes(@Param("fiveMinutesAgo") Timestamp fiveMinutesAgo);
    @Query(value = "select hostIp from temp_message", nativeQuery = true)
    List<String> findAllMessageIp();
}
